package com.example.index.web.impl;

import com.example.index.bean.User;
import com.example.index.web.ICloudOrderAction;
import org.springframework.stereotype.Component;

@Component
public class CloudOrderActionImpl implements ICloudOrderAction {

    @Override
    public String order() {
        return null;
    }

    @Override
    public String hello(String name) {
        return "你好" + name;
    }

    @Override
    public int add(int a, int b) {
        return a  +  b;
    }

    @Override
    public User reg(User user) {
        user.setName("降级" + user.getName());
        user.setAge(user.getAge()+5);
        return user;
    }

    @Override
    public User reg(User user, int age) {
        user.setName("降级" + user.getName());
        user.setAge(user.getAge()+ age);
        return user;
    }
}
